import $http from "@/utils/http";

//查询用户列表 
export async function getUserListApi(param){
    return await $http.get("/user/list",{params:param});
}
//用户添加
export async function addUserApi(param){
    return await $http.post('/user/add',param)
}
//用户更新
export async function updateUserApi(param){
    return await $http.post('/user/update',param)
}
//用户删除
export async function deleteUserApi(param){
    return await $http.delete(`/user/delete/${param}`)
}
//查询所有角色并选中用户拥有的角色
export async function checkRolesApi(param){
    return await $http.get(`/user/checkRoles/${param}`);
}

//保存用户拥有的角色id
export async function saveRoleIdsByUserIdApi(param){
    return await $http.put(`/user/saveRoleIdsByUserId`,param)
}